package com.atguigu;

import com.atguigu.ba03.Student;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.File;

public class MyTest03 {

    @Test
    public void test01() {
        String config = "ba03/total.xml";
        ApplicationContext ctx = new ClassPathXmlApplicationContext(config);

        Student myStudent = (Student) ctx.getBean("myStudent3");
        System.out.println("Student对象=" + myStudent);

        File myFile = (File) ctx.getBean("myFile");
        System.out.println("myFile==" + myFile.getName());

    }

}
